package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysCompanyUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface SysCompanayUserMapper extends BaseMapper<SysCompanyUser> {


    @Select("select cu.* from sys_company_user cu INNER JOIN sys_company_user_role cur INNER JOIN sys_role r on cu.id = cur.company_user_id and cur.role_id = r.id where r.company_id = #{companyId} and r.role_name = 'ROLE_ADMIN_SYS'")
    SysCompanyUser queryMainAdminCompanyUser(Long companyId);
}